import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import router from './router'

//组件可使用axios
import axios from 'axios'

//导入全局样式表
import './assets/css/global.css'

//按需引入element-ui
//弹框提示组件
import {Button, Form, FormItem, Input, Message, Row,Container,Header,Aside,Main,
  Menu,Submenu,MenuItem,Breadcrumb,BreadcrumbItem,Card,Col,
  Table,TableColumn,Tooltip,Dialog,Select,Option,Popconfirm,Avatar,
  Descriptions,DescriptionsItem,DatePicker,
  Pagination} from 'element-ui'

Vue.config.productionTip = false
Vue.use(VueRouter)

Vue.component(Form.name, Form)
Vue.component(FormItem.name, FormItem)
Vue.component(Input.name, Input)
Vue.component(Button.name, Button)
Vue.component(Row.name, Row)
Vue.component(Container.name, Container)
Vue.component(Header.name, Header)
Vue.component(Aside.name, Aside)
Vue.component(Main.name, Main)
Vue.component(Menu.name, Menu)
Vue.component(MenuItem.name, MenuItem)
Vue.component(Submenu.name, Submenu)
Vue.component(Breadcrumb.name, Breadcrumb)
Vue.component(BreadcrumbItem.name, BreadcrumbItem)
Vue.component(Card.name, Card)
Vue.component(Col.name, Col)
Vue.component(Table.name, Table)
Vue.component(TableColumn.name, TableColumn)
Vue.component(Tooltip.name, Tooltip)
Vue.component(Dialog.name, Dialog)
Vue.component(Select.name, Select)
Vue.component(Option.name, Option)
Vue.component(Popconfirm.name, Popconfirm)
Vue.component(Avatar.name, Avatar)
Vue.component(Descriptions.name, Descriptions)
Vue.component(DescriptionsItem.name, DescriptionsItem)
Vue.component(DatePicker.name, DatePicker)
Vue.component(Pagination.name, Pagination)

Vue.prototype.$message = Message

//配置请求根路径
// axios.defaults.baseURL = 'http://hotelb.zbyicu.online'
axios.defaults.withCredentials = true
axios.defaults.baseURL = 'http://localhost:8000'

new Vue({
  el:'#app',
  render: h => h(App),
  router,
})
